package com.jcp.service.imple;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jcp.dao.ParmentMapper;

import com.jcp.entity.Parment;
import com.jcp.entity.Record;
import com.jcp.service.ParmentService;
import com.jcp.util.LayuiData;

import com.jcp.dao.RecordMapper;


import com.jcp.entity.Users;



import tk.mybatis.mapper.entity.Example;





@Service
public class ParmentServiceImple implements ParmentService {
	
	@Autowired
	private ParmentMapper pm;

	@Override
	public LayuiData<Parment> selParmentMessageByPage(int page, int pageSize, String strLike) {
		// TODO Auto-generated method stub
		strLike="%"+strLike+"%";
		PageHelper.startPage(page, pageSize);
		Example example=new Example(Record.class);
		example.createCriteria().andLike("paymentId", strLike);
		List<Parment> parment=pm.selectByExample(example);
		PageInfo<Parment> pageInfo=new PageInfo<Parment>(parment);
		LayuiData<Parment> layuiData=new LayuiData<>(0, "", (int)pageInfo.getTotal(), pageInfo.getList());
		return layuiData;
	}

}




